<?php
include("xmlrpc.inc");
include("bmanager_methods.inc");
$xmlrpc_request = XMLRPC_parse($HTTP_RAW_POST_DATA);
$methodName = XMLRPC_getMethodName($xmlrpc_request);
$params = XMLRPC_getParams($xmlrpc_request);
if(!isset($xmlrpc_methods[$methodName])){
  $xmlrpc_methods['method_not_found']($methodName);
} else {
  # call the method
  init_db_connection();
  $xmlrpc_methods[$methodName]($params);
  close_db_connection();
}
?>
